<?php
//echo $this->Form->create();
$joblists=$formData['joblists'];
$prs=$formData['prs'];
?>
<div class="inform">
    <?php  __('Incompatibilities are checked in Qsoft by the profil administrator') ?>
</div>
    <fieldset>
        <legend><?php __('Add Job'); ?></legend>
        <h2 class="showNextDiv pointer"><?php __('Job Function')  ?></h2>
        <div class="isHidden">
<?php        echo $this->Form->input('user_jobfunction_id',array('options'=>$joblists['jobfunctions'],'empty'=>'select','label'=>array('text'=>__('Jobfunction',true),'class'=>'required'))); ?>
            <div class="showNextBtn isNewJobfunction"><?php __('Not in this List ?')  ?></div>
            <div class="isNewJobfunctionDiv isHidden">
<?php        echo $this->Form->input('is_new_jobfunction',array('label'=>false,'class'=>'isHidden'));
             echo $this->Form->input('user_jobfunction_title',array('label'=>__('Jobfunction Title',true)));   ?>
            </div>
        </div>
        <h2 class="showNextDiv pointer"><?php __('Job Profiles')  ?></h2>
        <div class="isHidden">
            <div class="inform isHidden" id="compCheck"></div>
            <div class="inform isHidden" id="compCheck2"></div>
            <div class="inform isHidden" id="compCheck3"></div>
<?php        echo $this->Form->input('user_jobprofile1_id',array('options'=>$joblists['jobprofiles'],'empty'=>'select','label'=>array('text'=>__('Jobprofile 1',true),'class'=>'required')));
             echo $this->Form->input('user_jobprofile2_id',array('options'=>$joblists['jobprofiles'],'empty'=>'select','label'=>__('Jobprofile 2',true)));
             echo $this->Form->input('user_jobprofile3_id',array('options'=>$joblists['jobprofiles'],'empty'=>'select','label'=>__('Jobprofile 3',true)));            
?>      
        </div>        
        <h2 class="showNextDiv pointer"><?php __('Profile reference')  ?></h2>
        <div class="isHidden">
<table>
    <tbody>
        <tr>
            <td>
                <?php echo $this->Form->input('profile_reference_user_id',array('options'=>$prs,'empty'=>'select','label'=>array('text'=>__('Profile Reference',true),'class'=>'required'))); ?>
            </td>
            <td>
                <div class="showNextBtn filter">
                    <?php echo $this->Html->link(__('Search User',true),array('controller'=>'Users','action'=>'filterUsers','DmdformProfileReferenceUserId'),array('class'=>'DmdformProfileReferenceUserId','rel'=>'mybox','dmdcode'=>'Search Prfile Reference'));  ?>
                </div>
            </td>
        </tr>
        <tr >
            <td>
                <div class="showNextBtn showNextDiv"><?php __('Not in this List ?');  ?></div>
                <div class="isHidden">
                    <?php echo $this->Form->input('profile_reference_name',array('label'=>__('Profile Reference Name And ID',true))); ?>
                </div>
            </td>
        </tr>
        <tr >
            <td>
                <div class="showNextDiv showNextBtn isHidden"><?php __('Details')  ?></div>
                <div class="isHidden showProfileReferenceUserId">

                </div>
            </td>
        </tr>
    </tbody>
</table>
        </div>        
        
        
    </fieldset>
<?php
//echo $this->Form->end('submit');
?>
<script type="text/javascript">
    $(document).ready(function(){
            if($('#DmdformUserJobfunctionTitle').val().length>0){
                $('.isNewJobfunctionDiv').show();
            }
    });

</script>

